<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图书馆座位预约系统 - 预约管理</title>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/booking-management.css">
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
    <header class="main-header">
        <div class="header-container">
            <div class="logo">
                <i class="fa fa-book"></i>
                <span>图书馆座位预约系统</span>
            </div>
            <nav class="main-nav">
                <ul>
                    <li><a href="index.html"><i class="fa fa-tachometer"></i> 首页</a></li>
                    <li><a href="seat-selection.html"><i class="fa fa-th-large"></i> 座位选择</a></li>
                    <li class="active"><a href="booking-management.html"><i class="fa fa-calendar"></i> 预约管理</a></li>
                    <li><a href="user-profile.html"><i class="fa fa-user"></i> 个人中心</a></li>
                </ul>
            </nav>
            <div class="user-info">
                <span class="welcome">欢迎，用户</span>
                <div class="avatar">
                    <i class="fa fa-user-circle"></i>
                </div>
            </div>
        </div>
    </header>

    <main class="main-content">
        <div class="container">
            <section class="management-header">
                <h1>我的预约管理</h1>
                <div class="filter-controls">
                    <div class="filter-group">
                        <label>预约状态：</label>
                        <select id="status-filter">
                            <option value="all">全部</option>
                            <option value="upcoming">即将开始</option>
                            <option value="ongoing">进行中</option>
                            <option value="completed">已完成</option>
                            <option value="canceled">已取消</option>
                        </select>
                    </div>
                    <div class="filter-group">
                        <label>时间范围：</label>
                        <input type="date" id="date-filter">
                    </div>
                </div>
            </section>

            <!-- 预约列表 -->
            <section class="booking-list">
                <div class="list-header">
                    <h2>预约列表</h2>
                </div>
                <div class="list-container">
                    <table class="booking-table">
                        <thead>
                            <tr>
                                <th>预约编号</th>
                                <th>图书馆区域</th>
                                <th>座位信息</th>
                                <th>预约时间</th>
                                <th>预约状态</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="booking-row upcoming">
                                <td>B20240120001</td>
                                <td>主馆3楼</td>
                                <td>3-12</td>
                                <td>2024-01-20 14:00-17:00</td>
                                <td><span class="status-badge upcoming">即将开始</span></td>
                                <td>
                                    <button class="btn btn-sm btn-primary">查看详情</button>
                                    <button class="btn btn-sm btn-secondary">取消预约</button>
                                </td>
                            </tr>
                            <tr class="booking-row upcoming">
                                <td>B20240121002</td>
                                <td>科技楼5楼</td>
                                <td>5-08</td>
                                <td>2024-01-21 09:00-12:00</td>
                                <td><span class="status-badge upcoming">即将开始</span></td>
                                <td>
                                    <button class="btn btn-sm btn-primary">查看详情</button>
                                    <button class="btn btn-sm btn-secondary">取消预约</button>
                                </td>
                            </tr>
                            <tr class="booking-row completed">
                                <td>B20240118003</td>
                                <td>主馆2楼</td>
                                <td>2-25</td>
                                <td>2024-01-18 18:00-21:00</td>
                                <td><span class="status-badge completed">已完成</span></td>
                                <td>
                                    <button class="btn btn-sm btn-primary">查看详情</button>
                                </td>
                            </tr>
                            <tr class="booking-row canceled">
                                <td>B20240119004</td>
                                <td>文科楼4楼</td>
                                <td>4-15</td>
                                <td>2024-01-19 14:00-17:00</td>
                                <td><span class="status-badge canceled">已取消</span></td>
                                <td>
                                    <button class="btn btn-sm btn-primary">查看详情</button>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </section>

            <!-- 预约时间线 -->
            <section class="booking-timeline">
                <h2>预约时间线</h2>
                <div class="timeline-container">
                    <!-- 今天 -->
                    <div class="timeline-day">
                        <h3><i class="fa fa-calendar"></i> 今天 (2024-01-20)</h3>
                        <div class="timeline-items">
                            <div class="timeline-item upcoming">
                                <div class="timeline-time">14:00</div>
                                <div class="timeline-content">
                                    <h4>主馆3楼 - 座位 3-12</h4>
                                    <p>预约时长：3小时</p>
                                    <span class="status-badge upcoming">即将开始</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 明天 -->
                    <div class="timeline-day">
                        <h3><i class="fa fa-calendar"></i> 明天 (2024-01-21)</h3>
                        <div class="timeline-items">
                            <div class="timeline-item upcoming">
                                <div class="timeline-time">09:00</div>
                                <div class="timeline-content">
                                    <h4>科技楼5楼 - 座位 5-08</h4>
                                    <p>预约时长：3小时</p>
                                    <span class="status-badge upcoming">即将开始</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 历史预约 -->
                    <div class="timeline-day">
                        <h3><i class="fa fa-calendar"></i> 历史记录</h3>
                        <div class="timeline-items">
                            <div class="timeline-item completed">
                                <div class="timeline-time">2024-01-18</div>
                                <div class="timeline-content">
                                    <h4>主馆2楼 - 座位 2-25</h4>
                                    <p>预约时长：3小时</p>
                                    <span class="status-badge completed">已完成</span>
                                </div>
                            </div>
                            <div class="timeline-item canceled">
                                <div class="timeline-time">2024-01-19</div>
                                <div class="timeline-content">
                                    <h4>文科楼4楼 - 座位 4-15</h4>
                                    <p>预约时长：3小时</p>
                                    <span class="status-badge canceled">已取消</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </main>

    <footer class="main-footer">
        <div class="container">
            <p>&copy; 2024 图书馆座位预约系统. 保留所有权利.</p>
        </div>
    </footer>

    <script src="js/main.js"></script>
    <script src="js/booking-management.js"></script>
</body>
</html>